import request from '@/utils/request'

// query
export function rawQuery(data) {
  return request({
    url: '/es',
    method: 'post',
    data
  })
}

export function viewData(id, data) {
  return request({
    url: '/es/view/' + id,
    method: 'post',
    data
  })
}

export function exportData(id, data) {
  return request({
    url: '/es/view/export/' + id,
    method: 'post',
    data
  })
}

export function saveView(data) {
  return request({
    url: '/es/view',
    method: 'post',
    data
  })
}

export function getView(id) {
  return request({
    url: '/es/view/' + id,
    method: 'get'
  })
}

export function viewList() {
  return request({
    url: '/es/views',
    method: 'get'
  })
}

